# Maintainer: Andreas Radke <andyrtr@archlinux.org>
# Maintainer: Jan de Groot <jgc@archlinux.org>

pkgbase=xorg-fonts-alias
pkgname=('xorg-fonts-alias-100dpi' 'xorg-fonts-alias-75dpi' 'xorg-fonts-alias-cyrillic' 'xorg-fonts-alias-misc')
pkgver=1.0.4
pkgrel=1
arch=('any')
url="https://xorg.freedesktop.org/"
makedepends=('xorg-util-macros')
license=('custom')
source=("${url}/releases/individual/font/font-alias-${pkgver}.tar.bz2")
sha512sums=('c67ac2ee344a601fcc09471580214b30c3fd6acc4800702840de44f0733e6d18b3faeec2fa3f4e2314025cc1724d7d6796ebaf620398fe350710182fd2c4b07d')

build() {
  cd "${srcdir}/font-alias-${pkgver}"
  ./configure --prefix=/usr --with-fontrootdir=/usr/share/fonts
  make
}

package_xorg-fonts-alias-100dpi() {

  pkgdesc="X.org font alias files - 100dpi font familiy"
  conflicts=(xorg-fonts-alias)

  cd "${srcdir}/font-alias-${pkgver}"
  make -C 100dpi DESTDIR="${pkgdir}" install
  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}

package_xorg-fonts-alias-75dpi() {

  pkgdesc="X.org font alias files - 75dpi font familiy"
  conflicts=(xorg-fonts-alias)

  cd "${srcdir}/font-alias-${pkgver}"
  make -C 75dpi DESTDIR="${pkgdir}" install
  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}
package_xorg-fonts-alias-cyrillic() {

  pkgdesc="X.org font alias files - cyrillic font familiy"
  conflicts=(xorg-fonts-alias)

  cd "${srcdir}/font-alias-${pkgver}"
  make -C cyrillic DESTDIR="${pkgdir}" install
  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}
package_xorg-fonts-alias-misc() {

  pkgdesc="X.org font alias files - misc font familiy"
  conflicts=(xorg-fonts-alias)

  cd "${srcdir}/font-alias-${pkgver}"
  make -C misc DESTDIR="${pkgdir}" install
  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"
}
